import os

from . import routing
from channels.routing import ProtocolTypeRouter, URLRouter
from django.core.asgi import get_asgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'websocket_study.settings') # websocket_study是项目的每次

application = ProtocolTypeRouter({
    "http": get_asgi_application(),
    "websocket":URLRouter(routing.websocket_urlpatterns),
})
